package com.rk.cust.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum CustStatus {

    active(0),

    unactivated(1),

    delete(2);

    private Integer status;

    public static final CustStatus of(Integer status) {
        if (null == status){
            return null;
        }
        for (CustStatus custStatus : CustStatus.values()) {
            if (custStatus.status == status){
                return custStatus;
            }
        }
        throw new TypeNotPresentException("CustStatus="+status,null);
    }
}
